import 'package:bruno/bruno.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';


import '../../AppConfig/Config.dart';
import '../../AppConfig/RouteAct.dart';
import '../../l10n/messages.dart';
import 'AccountCancellation.dart';

class AccountAndSecurity extends StatefulWidget {
  const AccountAndSecurity({super.key});

  @override
  State<AccountAndSecurity> createState() => _AccountAndSecurityState();
}

class _AccountAndSecurityState extends State<AccountAndSecurity> {
  @override
  Widget build(BuildContext context) {
    var messages = AppLocalizations.of(context)!;
    return Scaffold(
      backgroundColor: MyColors.backgreyColor,
      appBar: AppBar(
        leading: IconButton(icon: Icon(Icons.arrow_back_ios,color: Colors.black,),onPressed: (){Navigator.pop(context);},),
        backgroundColor: Colors.white,
        centerTitle: true,
        title: Text(messages['账户与安全'],style: TextStyle(fontWeight: FontWeight.w300,fontSize: 16.sp),),
      ),
      body: ListView(
        children: [
          // GestureDetector(
          //   child:  Container(
          //     padding: EdgeInsets.only(right: 10.w),
          //     height: 46.h,
          //     color: Colors.white,
          //     child:  Row(
          //       mainAxisAlignment: MainAxisAlignment.spaceBetween,
          //       children: [
          //         Row(
          //           children: [
          //             SizedBox(width: 8.h,),
          //             Text(messages['微信账户关联'],style: TextStyle(color: Colors.black),),
          //           ],
          //         ),
          //         Row(
          //           children: [
          //             Text(messages['绑定/解绑'],style: TextStyle(color:MyColors.hintColor,fontSize: 12.sp),),
          //             Icon(Icons.arrow_forward_ios,color: MyColors.authTipColor,),
          //           ],
          //         ),
          //
          //       ],
          //     ),
          //   ),
          //   onTap: (){
          //
          //   },
          // ),
          SizedBox(height: 8.h,),
          GestureDetector(
            child:  Container(
              padding: EdgeInsets.only(right: 10.w),
              height: 46.h,
              color: Colors.white,
              child:  Row(
                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                children: [
                  Row(
                    children: [
                      SizedBox(width: 8.h,),
                      Text(messages['账户注销'],style: TextStyle(color: Colors.black,fontSize: 14.sp),),
                    ],
                  ),
                  Row(
                    children: [
                      Text(messages['注销后账户无法恢复，请谨慎操作'],style: TextStyle(color:MyColors.hintColor,fontSize: 13.sp),),
                      Icon(Icons.arrow_forward_ios,color: MyColors.authTipColor,size: 14,),
                    ],
                  ),

                ],
              ),
            ),
            onTap: (){
              Navigator.push( context, FadeRoute(page:AccountCancellation()));
            },
          ),
          Divider(height: 1.h,color: MyColors.backgreyColor,),
          GestureDetector(
            child:  Container(
              padding: EdgeInsets.only(right: 10.w),
              height: 46.h,
              color: Colors.white,
              child:  Row(
                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                children: [
                  Row(
                    children: [
                      SizedBox(width: 8.h,),
                      Text('钱包注销',style: TextStyle(color: Colors.black,fontSize: 14.sp),),
                    ],
                  ),
                  Row(
                    children: [
                      Icon(Icons.arrow_forward_ios,color: MyColors.authTipColor,size: 14,),
                    ],
                  ),

                ],
              ),
            ),
            onTap: (){

            },
          ),

        ],
      ),
    );
  }
}
